package com.kc.gb.device.common.adapter.feigns;


import com.kc.gb.base.dto.Result;
import com.kc.gb.device.common.adapter.dto.wes.station.dto.StationSlotDTO;
import com.kc.gb.device.common.adapter.dto.wes.station.dto.StationSlotQuery;
import com.kc.gb.device.common.adapter.dto.wes.station.dto.WesStationDTO;
import com.kc.gb.device.common.adapter.dto.wes.station.dto.StationQuery;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "phoenix-station",url = "${hostIP}"/*,configuration = FeignConfig.class*/)
public interface WesStationFeign {
//    @RequestMapping(
//            method = {RequestMethod.GET},
//            value = {"/api/station/system/warehouse/{warehouseId}/station/biz-type-scope-by-station-code/{stationCode}"}
//    )
//    Result<List<StationBizTypeScopeDTO>> selectStationBizTypeScopeByStationCode(@PathVariable(name = "warehouseId", required = true) Long warehouseId, @PathVariable(name = "stationCode", required = true) String stationCode);

//    @RequestMapping(
//            method = {RequestMethod.POST},
//            value = {"/api/station/system/warehouse/{warehouseId}/station-slot-binding/select-by-work-id/{workType}"}
//    )
//    Result<Map<Long, List<StationSlotBindingDTO>>> batchSelectStationSlotBindingByWorkId(@PathVariable(name = "warehouseId", required = true) Long warehouseId, @PathVariable(name = "workType", required = true) WorkType workType, @RequestBody List<Long> workIds);

//    @RequestMapping(
//            method = {RequestMethod.POST},
//            value = {"/api/station/system/warehouse/{warehouseId}/station-slot-binding/select-all-by-work-id/{workType}"}
//    )
//    Result<Map<Long, List<StationSlotBindingDTO>>> batchSelectAllStationSlotBindingByWorkId(@PathVariable(name = "warehouseId", required = true) Long warehouseId, @PathVariable(name = "workType", required = true) WorkType workType, @RequestBody List<Long> workIds);

//    @RequestMapping(
//            method = {RequestMethod.POST},
//            value = {"/api/station/system/warehouse/{warehouseId}/station-slot-binding/select-by-order-id/{workType}"}
//    )
//    Result<Map<Long, List<StationSlotBindingDTO>>> batchSelectStationSlotBindingByOrderId(@PathVariable(name = "warehouseId", required = true) Long warehouseId, @PathVariable(name = "workType", required = true) WorkType workType, @RequestBody List<Long> orderIds);

//    @RequestMapping(
//            method = {RequestMethod.POST},
//            value = {"/api/station/system/warehouse/{warehouseId}/station-slot-binding/select-by-slot"}
//    )
//    Result<List<StationSlotBindingDTO>> batchSelectStationSlotBindingBySlotCodes(@PathVariable(name = "warehouseId", required = true) Long warehouseId, @RequestBody List<String> slotCodes);

//    @RequestMapping(
//            method = {RequestMethod.POST},
//            value = {"/api/station/system/warehouse/{warehouseId}/agv/leave-station"}
//    )
//    Result<Void> leaveStation(@PathVariable(name = "warehouseId", required = true) Long warehouseId, @RequestBody StationEntryBO stationEntryBO);

//    @RequestMapping(
//            method = {RequestMethod.POST},
//            value = {"/api/station/system/warehouse/{warehouseId}/agv/arrive-station"}
//    )
//    Result<Void> arriveStation(@PathVariable(name = "warehouseId", required = true) Long warehouseId, @RequestBody StationEntryBO stationEntryBO);

//    @RequestMapping(
//            method = {RequestMethod.POST},
//            value = {"/api/station/system/warehouse/{warehouseId}/task/abort"}
//    )
//    Result<Void> abortTask(@PathVariable(name = "warehouseId", required = true) Long warehouseId, @RequestBody StationTaskBO<?> stationTaskBO);

    @RequestMapping(
            method = {RequestMethod.POST},
            value = {"/api/station/system/warehouse/{warehouseId}/station/list"}
    )
    Result<List<WesStationDTO>> selectStations(@PathVariable(name = "warehouseId") Long warehouseId, @RequestBody StationQuery query);

//    @RequestMapping(
//            method = {RequestMethod.POST},
//            value = {"/api/station/system/warehouse/{warehouseId}/station-slot/bind"}
//    )
//    Result<Void> bindStationSlots(@PathVariable(name = "warehouseId", required = true) Long warehouseId, @RequestBody List<StationSlotBindingDTO> slotBindings);

//    @RequestMapping(
//            method = {RequestMethod.POST},
//            value = {"/api/station/system/warehouse/{warehouseId}/task/dispatch"}
//    )
//    Result<Void> dispatchTask(@PathVariable(name = "warehouseId", required = true) Long warehouseId, @RequestBody StationTaskBO<?> pStationTaskBO);

    @RequestMapping(
            method = {RequestMethod.GET},
            value = {"/api/station/system/warehouse/{warehouseId}/synchronize/all"}
    )
    Result<Void> synchronizeStations(@PathVariable(name = "warehouseId", required = true) Long warehouseId);

    @RequestMapping(
            method = {RequestMethod.POST},
            value = {"/api/station/system/warehouse/{warehouseId}/station/work-binding-station/delete"}
    )
    Result<Void> batchDeleteWorkBindingStation(@PathVariable(name = "warehouseId", required = true) Long warehouseId, @RequestBody List<Long> ids);

//    @RequestMapping(
//            method = {RequestMethod.POST},
//            value = {"/api/station/system/warehouse/{warehouseId}/agv/enter-leave-station-record"}
//    )
//    Result<Void> recordEnterLeaveStation(@PathVariable(name = "warehouseId", required = true) Long warehouseId, @RequestBody EnterLeaveStationRecordBO recordBO);

//    @RequestMapping(
//            method = {RequestMethod.POST},
//            value = {"/api/station/system/warehouse/{warehouseId}/station/station-confirm-task/query"}
//    )
//    Result<List<StationConfirmTaskDTO>> selectStationConfirmTask(@PathVariable(name = "warehouseId", required = true) Long warehouseId, @RequestBody StationConfirmTaskQuery stationConfirmTaskQuery);

//    @RequestMapping(
//            method = {RequestMethod.POST},
//            value = {"/api/station/system/warehouse/{warehouseId}/station/station-task-group/update"}
//    )
//    Result<Integer> batchUpdateStationTaskGroup(@PathVariable(name = "warehouseId", required = true) Long warehouseId, @RequestBody List<StationTaskGroupDTO> stationTaskGroupDTOS);

//    @RequestMapping(
//            method = {RequestMethod.POST},
//            value = {"/api/station/system/warehouse/{warehouseId}/station/station-confirm-task/insert"}
//    )
//    Result<Integer> batchInsertStationConfirmTask(@PathVariable(name = "warehouseId", required = true) Long warehouseId, @RequestBody List<StationConfirmTaskDTO> stationConfirmTaskDTOS);

//    @RequestMapping(
//            method = {RequestMethod.POST},
//            value = {"/api/station/system/warehouse/{warehouseId}/station/station-task-group/insert"}
//    )
//    Result<Integer> batchInsertStationTaskGroup(@PathVariable(name = "warehouseId", required = true) Long warehouseId, @RequestBody List<StationTaskGroupDTO> stationTaskGroupDTOS);

//    @RequestMapping(
//            method = {RequestMethod.POST},
//            value = {"/api/station/system/warehouse/{warehouseId}/inner-task/dispatch"}
//    )
//    Result<Void> dispatchInnerTask(@PathVariable(name = "warehouseId", required = true) Long warehouseId, @RequestBody StationTaskInnerBO<?> stationTaskInnerBO);

//    @RequestMapping(
//            method = {RequestMethod.POST},
//            value = {"/api/station/system/warehouse/{warehouseId}/station/work-binding-station/insert"}
//    )
//    Result<Integer> batchInsertWorkBindingStation(@PathVariable(name = "warehouseId", required = true) Long warehouseId, @RequestBody List<WorkBindingStationDTO> workBindingStationDTOS);

   @RequestMapping(
           method = {RequestMethod.POST},
           value = {"/api/station/system/warehouse/{warehouseId}/station-slot/list"}
   )
   Result<List<StationSlotDTO>> selectStationSlots(@PathVariable(name = "warehouseId", required = true) Long warehouseId, @RequestBody StationSlotQuery query);

//    @RequestMapping(
//            method = {RequestMethod.POST},
//            value = {"/api/station/system/warehouse/{warehouseId}/station-slot/unbind/{really}"}
//    )
//    Result<Void> unbindStationSlots(@PathVariable(name = "warehouseId", required = true) Long warehouseId, @RequestBody List<StationSlotBindingDTO> slotBindings, @PathVariable(name = "really", required = true) boolean really);

//    @RequestMapping(
//            method = {RequestMethod.POST},
//            value = {"/api/station/system/warehouse/{warehouseId}/station/work-binding-station/update"}
//    )
//    Result<Integer> batchUpdateWorkBindingStation(@PathVariable(name = "warehouseId", required = true) Long warehouseId, @RequestBody List<WorkBindingStationDTO> workBindingStationDTOS);

//    @RequestMapping(
//            method = {RequestMethod.POST},
//            value = {"/api/station/system/warehouse/{warehouseId}/station/station-task-group/query"}
//    )
//    Result<List<StationTaskGroupDTO>> selectStationTaskGroup(@PathVariable(name = "warehouseId", required = true) Long warehouseId, @RequestBody StationTaskGroupQuery stationTaskGroupQuery);

//    @RequestMapping(
//            method = {RequestMethod.POST},
//            value = {"/api/station/system/warehouse/{warehouseId}/station/station-confirm-task/update"}
//    )
//    Result<Integer> batchUpdateStationConfirmTask(@PathVariable(name = "warehouseId", required = true) Long warehouseId, @RequestBody List<StationConfirmTaskDTO> stationConfirmTaskDTOS);

    @RequestMapping(
            method = {RequestMethod.POST},
            value = {"/api/station/system/warehouse/{warehouseId}/station/station-confirm-task/delete"}
    )
    Result<Void> batchDeleteStationConfirmTask(@PathVariable(name = "warehouseId", required = true) Long warehouseId, @RequestBody List<Long> ids);

//    @RequestMapping(
//            method = {RequestMethod.POST},
//            value = {"/api/station/system/warehouse/{warehouseId}/station/work-binding-station/query"}
//    )
//    Result<List<WorkBindingStationDTO>> selectWorkBindingStation(@PathVariable(name = "warehouseId", required = true) Long warehouseId, @RequestBody WorkBindingStationQuery workBindingStationQuery);

    @RequestMapping(
            method = {RequestMethod.POST},
            value = {"/api/station/system/warehouse/{warehouseId}/station/station-task-group/delete"}
    )
    Result<Void> batchDeleteStationTaskGroup(@PathVariable(name = "warehouseId", required = true) Long warehouseId, @RequestBody List<Long> ids);

    @RequestMapping(
            method = {RequestMethod.POST},
            value = {"/api/station/system/warehouse/{warehouseId}/synchronize-with-basic/station/{stationCode}"}
    )
    Result<Void> synchronizeSlotWithBasic(@PathVariable(name = "warehouseId", required = true) Long warehouseId, @PathVariable(name = "stationCode", required = true) String stationCode);

//    @RequestMapping(
//            method = {RequestMethod.POST},
//            value = {"/api/station/system/warehouse/{warehouseId}/stationTask/list"}
//    )
//    Result<List<StationTaskDTO>> selectStationTasks(@PathVariable(name = "warehouseId", required = true) Long warehouseId, @RequestBody WesQuery wesQuery);

//    @RequestMapping(
//            method = {RequestMethod.POST},
//            value = {"/api/station/system/warehouse/{warehouseId}/station-slot/batchUpdate"}
//    )
//    Result<Void> batchUpdateSlotBinding(@PathVariable(name = "warehouseId", required = true) Long warehouseId, @RequestBody List<StationSlotBindingDTO> slotBindings);

    @RequestMapping(
            method = {RequestMethod.POST},
            value = {"/api/station/system/warehouse/{warehouseId}/update-bucket-hot/{bucketCode}/{hotValue}"}
    )
    Result<Void> updateBucketHotValue(@PathVariable(name = "warehouseId", required = true) Long warehouseId, @PathVariable(name = "bucketCode", required = true) String bucketCode, @PathVariable(name = "hotValue", required = true) Double hotValue);

    @RequestMapping(
            method = {RequestMethod.POST},
            value = {"/api/station/system/warehouse/{warehouseId}/update-bucket-attr/{updateType}"}
    )
    Result<Void> updateAllBucketHotMove(@PathVariable(name = "warehouseId", required = true) Long warehouseId, @PathVariable(name = "updateType", required = true) String updateType);

//    @RequestMapping(
//            method = {RequestMethod.POST},
//            value = {"/api/station/system/warehouse/{warehouseId}/station-slot/unbinddirect/{really}/{releasecontainer}"}
//    )
//    Result<Void> unbindStationSlotsDirect(@PathVariable(name = "warehouseId", required = true) Long warehouseId, @RequestBody List<StationSlotBindingDTO> slotBindings, @PathVariable(name = "really", required = true) boolean really, @PathVariable(name = "releasecontainer", required = true) boolean releasecontainer);

//    @RequestMapping(
//            method = {RequestMethod.POST},
//            value = {"/api/station/system/warehouse/{warehouseId}/station/station-by-biz-type-scope"}
//    )
//    Result<List<StationBizTypeScopeDTO>> selectStationByBizTypeScope(@PathVariable(name = "warehouseId", required = true) Long warehouseId, @RequestBody List<StationBizType> stationBizTypeList);

//    @RequestMapping(
//            method = {RequestMethod.POST},
//            value = {"/api/station/system/warehouse/{warehouseId}/station-entry/list"}
//    )
//    Result<List<StationEntryDTO>> selectStationEntries(@PathVariable(name = "warehouseId", required = true) Long warehouseId, @RequestBody WesQuery wesQuery);

//    @RequestMapping(
//            method = {RequestMethod.POST},
//            value = {"/api/station/system/warehouse/{warehouseId}/query-bucket-hot/"}
//    )
//    Result<List<StationBucketHotValue>> queryBucketHotValue(@PathVariable(name = "warehouseId", required = true) Long warehouseId);

//    @RequestMapping(
//            method = {RequestMethod.POST},
//            value = {"/api/station/system/warehouse/{warehouseId}/station/station-slot-sku"}
//    )
//    Result<List<StationSlotSkuDTO>> selectStationSlotSku(@PathVariable(name = "warehouseId", required = true) Long warehouseId, @RequestBody WesQuery query);

//    /**
//     * 向 Station 上报四面码信息
//     * @param request
//     * @return
//     */
//    @RequestMapping(method = {RequestMethod.POST}, value = {"/api/station/add/container-side"})
//    Result<BoxResponseBO> addContainerSideCode(@RequestBody BoxRequestBO request);

}
